cmake_minimum_required(VERSION 3.16)
project(PointFlowStudio LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 REQUIRED COMPONENTS Core Widgets OpenGL Gui)

# 启用自动处理 MOC/UIC/RCC
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

# 源文件
add_executable(${PROJECT_NAME}
    main.cpp
    mainwindow.h mainwindow.cpp
    openglwidget.h openglwidget.cpp
    # resources/resources.qrc
)

# 链接 Qt 库
target_link_libraries(${PROJECT_NAME}
    Qt5::Core 
    Qt5::Widgets 
    Qt5::OpenGL
    Qt5::Gui
)